﻿<%@ Page Title="" Language="C#" MasterPageFile="~/adminpanel.master" AutoEventWireup="true" CodeFile="Supplier.aspx.cs" Inherits="Web_Default" %><%@ Register assembly="DevExpress.Web.ASPxHtmlEditor.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxHtmlEditor" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxSpellChecker.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxSpellChecker" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxObjectContainer" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRatingControl" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

    <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
        ClientIDMode="AutoID" CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
        CssPostfix="BlackGlass" DataSourceID="SqlDataSource1" KeyFieldName="Sup_ID" 
        Width="100%" onrowvalidating="ASPxGridView1_RowValidating1" 
        onstartrowediting="ASPxGridView1_StartRowEditing1">
        <Columns>
            <dx:GridViewCommandColumn VisibleIndex="0" FixedStyle="Left" Width="50px">
                <EditButton Visible="True">
                </EditButton>

                 <ClearFilterButton Visible="True">
                </ClearFilterButton>
                </dx:GridViewCommandColumn>
                <dx:GridViewCommandColumn VisibleIndex="1" FixedStyle="Left" Width="50px">
                <NewButton Visible="True">
                </NewButton>
                </dx:GridViewCommandColumn>
                <dx:GridViewCommandColumn VisibleIndex="2" FixedStyle="Left" Width="50px">
                <DeleteButton Visible="True">
                </DeleteButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn FieldName="Sup_ID"  VisibleIndex="3" 
                Caption="Supplier ID">
                <PropertiesTextEdit>
                    <ValidationSettings>
                        <RequiredField ErrorText="Please Enter Supplier ID" />
                    </ValidationSettings>
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Sup_Name" VisibleIndex="4" 
                Caption="Supplier Name">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Sup_Add" VisibleIndex="5" 
                Caption="Address">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Sup_Tel" VisibleIndex="6" 
                Caption="Phone No">
                <PropertiesTextEdit>
                    <MaskSettings Mask="(999) 0000000" />
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Sup_mob" VisibleIndex="7" 
                Caption="Mobile No">
                <PropertiesTextEdit>
                    <MaskSettings Mask="(999) 0000000" />
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Sup_fax" VisibleIndex="8" 
                Caption="Fax No">
                <PropertiesTextEdit>
                    <MaskSettings Mask="(999) 0000000" />
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Sup_email" VisibleIndex="9" 
                Caption="E-mail">
                <PropertiesTextEdit>
                    <ValidationSettings ErrorText="">
                        <RegularExpression ErrorText="Please Enter Correct E-mail Address" 
                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />
                    </ValidationSettings>
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Sup_web" VisibleIndex="10" 
                Caption="Web Address">
                <PropertiesTextEdit>
                    <ValidationSettings>
                        <RegularExpression ErrorText="Please Enter Web Address" />
                    </ValidationSettings>
                </PropertiesTextEdit>
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="Contact Person" FieldName="Contact" 
                VisibleIndex="11">
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsBehavior ConfirmDelete="True" />
        <SettingsPager PageSize="25">
        </SettingsPager>
        <Settings ShowHorizontalScrollBar="True" />
        <Images SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/BlackGlass/GridView/gvLoadingOnStatusBar.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/BlackGlass/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
            CssPostfix="BlackGlass">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
        </Styles>
        <StylesEditors>
            <CalendarHeader Spacing="1px">
            </CalendarHeader>
            <ProgressBar Height="25px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
        DeleteCommand="DELETE FROM [Tbl_Supplier] WHERE [Sup_ID] = @Sup_ID" 
        InsertCommand="INSERT INTO [Tbl_Supplier] ([Sup_ID], [Sup_Name], [Sup_Tel], [Sup_mob], [Sup_fax], [Sup_email], [Sup_web], [Sup_Add], [Contact]) VALUES (@Sup_ID, @Sup_Name, @Sup_Tel, @Sup_mob, @Sup_fax, @Sup_email, @Sup_web, @Sup_Add, @Contact)" 
        SelectCommand="SELECT [Sup_ID], [Sup_Name], [Sup_Tel], [Sup_mob], [Sup_fax], [Sup_email], [Sup_web], [Sup_Add], [Contact] FROM [Tbl_Supplier]" 
        
        UpdateCommand="UPDATE [Tbl_Supplier] SET [Sup_Name] = @Sup_Name, [Sup_Tel] = @Sup_Tel, [Sup_mob] = @Sup_mob, [Sup_fax] = @Sup_fax, [Sup_email] = @Sup_email, [Sup_web] = @Sup_web, [Sup_Add] = @Sup_Add, [Contact] = @Contact WHERE [Sup_ID] = @Sup_ID">
        <DeleteParameters>
            <asp:Parameter Name="Sup_ID" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Sup_ID" Type="String" />
            <asp:Parameter Name="Sup_Name" Type="String" />
            <asp:Parameter Name="Sup_Tel" Type="String" />
            <asp:Parameter Name="Sup_mob" Type="String" />
            <asp:Parameter Name="Sup_fax" Type="String" />
            <asp:Parameter Name="Sup_email" Type="String" />
            <asp:Parameter Name="Sup_web" Type="String" />
            <asp:Parameter Name="Sup_Add" Type="String" />
            <asp:Parameter Name="Contact" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Sup_Name" Type="String" />
            <asp:Parameter Name="Sup_Tel" Type="String" />
            <asp:Parameter Name="Sup_mob" Type="String" />
            <asp:Parameter Name="Sup_fax" Type="String" />
            <asp:Parameter Name="Sup_email" Type="String" />
            <asp:Parameter Name="Sup_web" Type="String" />
            <asp:Parameter Name="Sup_Add" Type="String" />
            <asp:Parameter Name="Contact" Type="String" />
            <asp:Parameter Name="Sup_ID" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>

    <asp:Label ID="Label2" runat="server" Text="Label" Visible="False"></asp:Label>

</asp:Content>

